package cn.iocoder.yudao.module.hs.dal.mysql.rfid;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.hs.dal.dataobject.rfid.RfidDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.hs.controller.admin.rfid.vo.*;

/**
 * RFID信息 Mapper
 *
 * @author 航盛
 */
@Mapper
public interface RfidMapper extends BaseMapperX<RfidDO> {

    default PageResult<RfidDO> selectPage(RfidPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RfidDO>()
                .likeIfPresent(RfidDO::getCode, reqVO.getCode())
                .eqIfPresent(RfidDO::getLowBattery, reqVO.getLowBattery())
                .likeIfPresent(RfidDO::getTrayCode, reqVO.getTrayCode())
                .betweenIfPresent(RfidDO::getWarehousingTime, reqVO.getWarehousingTime())
                .betweenIfPresent(RfidDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(RfidDO::getId));
    }

}